#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<sys/types.h>
#include<sys/stat.h>
#include<fcntl.h>
#include<unistd.h>
#include<assert.h>

#define SIZE 1024
#define LINE_REFRESH 1
#define NOW_REFRESH 2
#define FULL_REFRESH 3

typedef struct MY_FILE{
      int fd;
      int size;
      int capacity;
      char buffer[SIZE];
      int refresh_type;
}_FILE;

_FILE* _fopen(const char *path, const char *mode);

void _fclose(_FILE *fp);

void _fwrite(void *str, size_t num, _FILE *fp);



